//通过scanf返回值读取用户输入
#include <stdio.h>

#define MIN_TO_HOUR 60

int main(void)
{
    int mins, hours, last_mins;

    puts("Enter the time (minute) you want to transfer (<= 0 to quit):");
    while (scanf("%d", &mins) == 1 && mins > 0)
    {
        hours = mins / MIN_TO_HOUR;
        last_mins = mins % MIN_TO_HOUR;
        printf("%d minutes equal to %d hour(s) and %d minute(s).\n", mins, hours, last_mins);

        puts("Enter the time (minute) you want to transfer (<= 0 to quit):");
    }
    puts("Bye!");

    return 0;
}
